﻿using WorkTool2.Enums;

namespace WorkTool2.Classes.Data
{
    public class LunchAllowanceStatistics
    {
        /// <summary>
        /// 日期
        /// </summary>
        public int Day { get; set; }

        /// <summary>
        /// 日期状态
        /// </summary>
        public CalendarDateStatus CalendarDateStatus { get; set; }

        /// <summary>
        /// 休假名称
        /// </summary>
        public string LeaveName { get; set; }

        /// <summary>
        /// 请假时间
        /// </summary>
        public LeaveTimeType? LeaveTime { get; set; }

        /// <summary>
        /// 津贴
        /// </summary>
        public string Allowance
        {
            get
            {
                if (CalendarDateStatus.Equals(CalendarDateStatus.DayOff))
                    return "N";
                if (LeaveTime.HasValue)
                {
                    if (LeaveTime.Value.Equals(LeaveTimeType.PM))
                    {
                        return "Y";
                    }
                    return "N";
                }
                else
                {
                    return "Y";
                }
            }
        }
    }
}